<template>
    <div v-for="item in pay" :key="item.id">
        <span>{{ item.name }}</span>
        <img :src="getImage(item.image)" alt="">
    </div>
</template>

<script setup>
import { ref } from 'vue';
import ali from'../../assets/alipay.png'
const pay = ref([
    {id:1,name:'支付宝',image:'alipay.png'},
    {id:1,name:'银联',image:'unionpay.png'},
    {id:1,name:'微信',image:'wechatpay.png'},
]
)

const getImage = (data) => {
	return new URL(`../../assets/${data}`, import.meta.url).href
}
</script>

<style scoped>

</style>